/**
 * Created with IntelliJ IDEA.
 * Description: myToString的实现
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-19  20:11
 */
public class Test1 {
    public static String myToString(int[] arrays) {
        String ret = "[";
        for (int i = 0; i < arrays.length; i++) {
            ret += arrays[i];
            if(i != arrays.length-1) {
                ret += ",";
            }
        }
        ret += "]";
        return ret;
    }
    public static void main(String[] args) {
        int[] arrays = {1,2,3,4,5};
        System.out.println(myToString(arrays));
    }
}
